import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/exer/` + url, ...arg)

/**
 * 练习Api接口管理器
 *
 * @author lrw
 * @date  2025/10/04 09:41
 **/
export default {
	// 获取练习分页
	exmExerPage(data) {
		return request('page', data, 'get')
	},
	// 提交练习表单 edit为true时为编辑，默认为新增
	exmExerSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除练习
	exmExerDelete(data) {
		return request('delete', data)
	},
	// 获取练习详情
	exmExerDetail(data) {
		return request('detail', data, 'get')
	}
}
